/*
 * @Descripttion:
 * @version: 1.0.0
 * @Author: 孙立政
 * @Date: 2020-07-13 15:45:16
 * @LastEditors: 孙立政
 * @LastEditTime: 2023-01-31 19:27:53
 */
import axios from 'axios'
import qs from 'qs'

if (process.env.NODE_ENV == 'development') {
  axios.defaults.baseURL = 'https://applets.diandiandidi.top'
} else if (process.env.NODE_ENV == 'debug') {
  axios.defaults.baseURL = 'https://diandidata.zjntwl.com'
} else if (process.env.NODE_ENV == 'production') {
  axios.defaults.baseURL = 'https://applets.diandiandidi.top'
}

export const davdata = data => {
  return axios.request({
    url: '/api/reportdata/summary?region_id=' + data.region_id + '&date_time=' + data.date_time,
    method: 'get'
  })
}

export const datalist = data => {
  return axios.request({
    url: '/api/reportdata/getDataList?region_id=' + data.region_id + '&date_time=' + data.date_time + '&data_page=1&data_limit=30&data_type=2',
    method: 'get'
  })
}

export const datalistuser = data => {
  return axios.request({
    url: '/api/reportdata/getDataList?region_id=' + data.region_id + '&date_time=' + data.date_time + '&data_page=1&data_limit=30&data_type=1',
    method: 'get'
  })
}
